﻿Imports Microsoft.VisualBasic
''' <summary>
''' Class That contains handlers and Events for a given IPN Request
''' </summary>
''' <remarks>Not all Events have been created fro this class</remarks>
Public Class IPNEvents
#Region "Events"
    Public Event Recurring_PaymentEvent(ByVal ipn As IPNRequest)
    Public Event Web_AcceptEvent(ByVal ipn As IPNRequest)
    Public Event Recurring_Payment_Profile_CreatedEvent(ByVal ipn As IPNRequest)
    Public Event recurring_payment_failedEvent(ByVal ipn As IPNRequest)
    Public Event recurring_payment_suspended_due_to_max_failed_paymentEvent(ByVal ipn As IPNRequest)
    Public Event recurring_payment_profile_cancelEvent(ByVal ipn As IPNRequest)
#End Region
    
#Region "Handlers"
    Public Sub Recurring_PaymentHandler(ByVal ipn As IPNRequest)
        RaiseEvent Recurring_PaymentEvent(ipn)
    End Sub

    Public Sub Web_AcceptHandler(ByVal ipn As IPNRequest)
        RaiseEvent Web_AcceptEvent(ipn)
    End Sub

    Public Sub Recurring_Payment_Profile_CreatedHandler(ByVal ipn As IPNRequest)
        RaiseEvent Recurring_Payment_Profile_CreatedEvent(ipn)
    End Sub

    Public Sub recurring_payment_failedHandler(ByVal ipn As IPNRequest)
        RaiseEvent recurring_payment_failedEvent(ipn)
    End Sub

    Public Sub recurring_payment_suspended_due_to_max_failed_paymentHandler(ByVal ipn As IPNRequest)
        RaiseEvent recurring_payment_suspended_due_to_max_failed_paymentEvent(ipn)
    End Sub

    Public Sub recurring_payment_profile_cancelHandler(ByVal ipn As IPNRequest)
        RaiseEvent recurring_payment_profile_cancelEvent(ipn)
    End Sub
#End Region
    
End Class
